import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('election_settings', { schema: 'vote' })
export class ElectionSettings {
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number;

  @Column('int', {
    name: 'start_time',
    comment: '选举开始时间',
    default: () => "'0'",
  })
  startTime: number;

  @Column('int', {
    name: 'end_time',
    comment: '选举结束时间',
    default: () => "'0'",
  })
  endTime: number;

  @Column('tinyint', {
    name: 'is_active',
    nullable: true,
    comment: '当前是否激活，0否，1是',
    width: 1,
    default: () => "'0'",
  })
  isActive: boolean | null;
}
